<template>
  <div style="margin-left: 230px">
    <PageHome v-if="userInfo == null " />
    <SellerHome v-if="userInfo != null && userInfo.identity == 1 " />
    <RetailersHome v-if="userInfo != null && userInfo.identity == 0 " />
  </div>
</template>
<script>
import PageHome from "../userpages/nologin/PageHome";
import RetailersHome from "../userpages/retailers/RetailersHome";
import SellerHome from "../userpages/seller/SellerHome";
import { getUserInfo } from "@/api/userApi";
import { getUserCookieInfo } from "@/utils/userCookie";
export default {
  components: {
    PageHome,
    RetailersHome,
    SellerHome,
  },
  computed: {
    userInfo(){
      return this.$store.getters.getUserInfo
    },
  },
  data() {
    return {
     // userInfo: null,
    };
  },
  created() {
    // this.userInfo = this.$store.getters.getUserInfo
  },
  mounted() {
     this.$store.commit("setNavStatus", 0);
  },
  destroyed(){
    this.$store.commit("init");
  }
};
</script>
<style lang="scss" scoped>
</style>